package com.atguigu.gmall.item.client;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.item.client.impl.ItemDegradeFeignClient;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.Map;

/**
 * 商品详情微服务的远程调用 接口
 * @author aaronmegs
 * @create 2020-02-23 7:39 下午
 */
@FeignClient(name = "service-item", fallback = ItemDegradeFeignClient.class)
public interface ItemFeignClient {

    // 商品详情页面 所有数据的请求
    @GetMapping("/api/item/{skuId}")
    public Result getSkuInfoBySkuId(@PathVariable(name = "skuId") Long skuId);
}
